package kgc.crm.util;

import lombok.Data;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@Data
public class ResultUtil {
    public static ResponseEntity error(String data){
        //new ResponseEntity(new CommonResult(
        return new ResponseEntity(new CommonResult(500,"error",data), HttpStatus.INTERNAL_SERVER_ERROR);
    }

    public static ResponseEntity success(Object data){
        return new ResponseEntity(new CommonResult(200,"success",data), HttpStatus.OK);
    }
}
